#include "buzz_app.h"
#include "sound_app.h"
#include "wt588f_app.h"

void DeleteAllAudioFile(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fDeleteAllAudioFile();
#endif
}

void PlayStartupAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayStartupAudio();

#else
  BuzzPlaySystemPowerupAudio();
#endif
}

void PlayDeviceActivatedAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayDeviceAuthorizationSuccessfulAudio();

#else
  BuzzPlayDeviceActivatedAudio();
#endif
}

void PlayKeypadToneAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayKeypadToneAudio();

#else
  BuzzPlayKeyToneAudio();
#endif
}

void PlayAntiPryingAlarmAduio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayAlarmAudio();

#else
  BuzzPlayAntiBreakingAlarmAudio();
#endif
}

void PlayDoorbellAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayDoorbellAudio();

#else
#endif
}

void PlaySwitchFaceAuthenticationMode(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlaySwitchFaceAuthenticationMode();

#else
  BuzzPlaySetSuccessAudio();
#endif
}

void PlaySwitchQrcodeAuthenticationModeAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlaySwitchQrcodeAuthenticationModeAudio();

#else
  BuzzPlaySetSuccessAudio();
#endif
}

void PlaySettingStatusAudio(bool Status)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlaySettingStatusAudio(Status);

#else
  (Status == true) ? BuzzPlaySetSuccessAudio() : BuzzPlaySetParameterErrorAudio();
#endif
}

void PlayVerificationStatusAudio(bool Status)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayVerificationStatusAudio(Status);
#else
  (Status == true) ? BuzzPlayDoorActionAudio() : BuzzPlayInsufficientPrivilegesAudio();
#endif
}

void PlayKeyRemoveAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
#else
  BuzzPlayKeyRemoveAudio();
#endif
}

void PlayKeyInsertAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
#else
  BuzzPlayKeyInsertAudio();
#endif
}

void PlayDeviceDiscoverStatusAudio(bool Status)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayDeviceDiscoverStatusAudio(Status);

#else
  (Status == true) ? BuzzPlaySetSuccessAudio() : BuzzPlaySetParameterErrorAudio();
#endif
}

void PlayFactoryResetStatusAudio(bool Status)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayDeviceDiscoverStatusAudio(Status);

#else
  (Status == true) ? BuzzPlaySetSuccessAudio() : BuzzPlaySetParameterErrorAudio();
#endif
}

void PlayPermissionDeniedAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayPermissionDeniedAudio();

#else
  BuzzPlayInsufficientPrivilegesAudio();
#endif
}

void PlayOutOfDateAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
#if _BOARD_TYPE_ == _V33_A_BOARD_
  Wt588fPlayPermissionDeniedAudio();
#else
  Wt588fPlayCardExpiredAudio();
#endif

#else
  BuzzPlayTimeErrorAudio();
#endif
}

void PlayAutiLockAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
#if _BOARD_TYPE_ == _V33_A_BOARD_
  Wt588fPlayPermissionDeniedAudio();
#else
  Wt588fPlayDeviceLockedMessageAudio();
#endif

#else
  BuzzPlayDeviceLockedAudio();
#endif
}

void PlayCardReplaceAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
#if _BOARD_TYPE_ == _V33_A_BOARD_
  Wt588fPlayPermissionDeniedAudio();
#else
  Wt588fPlayCardReplacedAudio();
#endif

#else
  BuzzPlayCardReplaceAudio();
#endif
}

void PlayEquipmentBusyStatusAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayEquipmentBusyStatusAudio();

#else
  BuzzPlayDeviceBusyAudio();
#endif
}

void PlayUserExecuteDoorLockAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayCurrentLockStatusAudio(false);

#else
  BuzzPlayDoorActionAudio();
#endif
}

void PlayCurrentLockStatusAudio(bool Status)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayCurrentLockStatusAudio(Status);

#else
  if (Status == true)
  {
    BuzzPlayDoorActionAudio();
  }
#endif
}

void PlayNetworkQualityAudio(uint8_t Rssi)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayNetworkQualityAudio(Rssi);
#endif
}

void PlayNormallyOpenStatueAudio(bool Status)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayNormallyOpenStatueAudio(Status);
#else
  if (Status == true)
  {
    BuzzPlayDoorActionAudio();
  }
#endif
}

void PlayInitiateDocumentReceiptAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayInitiateDocumentReceiptAudio();
#endif
}

void PlaySystemLockAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlaySystemLockAudio();

#else
  BuzzPlaySystemLockedAudio();
#endif
}

void PlayLowBatteryAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayLowBatteryAudio();

#else
  BuzzPlayLowPowerAudio();
#endif
}

void PlayDoorNotCloseAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayAlarmAudio();

#else
  BuzzPlayFalseLockAudio();
#endif
}

void PlayAddNewCardAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayAddNewCardAudio();

#else
  BuzzPlayLocalRegisterAudio();
#endif
}

void PlayEnterKeyViaTheKeyboardAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayEnterKeyViaTheKeyboardAudio();

#else
  BuzzPlayLocalRegisterAudio();
#endif
}

void PlayLnvalidKeyValueAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayLnvalidKeyValueAudio();

#else
  BuzzPlayLocalRegisterAudio();
#endif
}

void PlayPasswordComparisonIsInconsistentAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayPasswordComparisonIsInconsistentAudio();

#else
  BuzzPlayLocalRegisterAudio();
#endif
}

void PlayAuthenticationKeyInconsistencyAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayAuthenticationKeyInconsistencyAudio();

#else
  BuzzPlayLocalRegisterAudio();
#endif
}

void PlayStartRegisterFaceEigenvaluesAudio(uint8_t WaitSecond)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayStartRegisterFaceEigenvaluesAudio(WaitSecond);

#else
  BuzzPlayLocalRegisterAudio();
#endif
}

void PlayLookMiddleAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayLookMiddleAudio();

#else
  BuzzPlayLocalRegisterAudio();
#endif
}

void PlayLookUpAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayLookUpAudio();

#else
  BuzzPlayLocalRegisterAudio();
#endif
}

void PlayLookDownAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayLookDownAudio();

#else
  BuzzPlayLocalRegisterAudio();
#endif
}

void PlayLookLeftAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayPlayLookLeftAudio();

#else
  BuzzPlayLocalRegisterAudio();
#endif
}

void PlayLookRightAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayLookRightAudio();

#else
  BuzzPlayLocalRegisterAudio();
#endif
}

void PlayStartPrintingAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayStartPrintingAudio();

#else
  BuzzPlayLocalRegisterAudio();
#endif
}

void PlayReadmissionPrintingAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayReadmissionPrintingAudio();

#else
  BuzzPlayLocalRegisterAudio();
#endif
}

void PlayPleaseScanQrCodeAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayPleaseScanQrCodeAudio();

#else
  BuzzPlayKeyToneAudio();
#endif
}

void PlayUserRegistrationStatusAudio(bool Status)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayUserRegistrationStatusAudio(Status);

#else
  (Status == true) ? BuzzPlayRegisterSuccessAudio() : BuzzPlayRegisterErrorAudio();
#endif
}

void PlayExitLocalRegisterAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayExitLocalRegisterAudio();

#else
  BuzzPlayRegisterErrorAudio();
#endif
}

void PlayExitVerificationModeAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fExitPlayExitVerificationModeAudio();

#else
  BuzzPlayRegisterErrorAudio();
#endif
}

void PlayDeviceInTheInitializedStateAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayDeviceInTheInitializedState();

#else
  BuzzPlaySystemInitializeAudio();
#endif
}

void PlayLicenseExpiredAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayLicenseExpiredAudio();

#else
  BuzzPlayExpiresLicenseCodeAudio();
#endif
}

void PlayExpirationReminderAudio(uint8_t Day)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayExpirationReminderAudio(Day);
#endif
}

void PlayConnectTestAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayConnectTestAudio();

#else
  BuzzPlayConnectTestAudio();
#endif
}

void PlaySelfTestErrorAudio(uint8_t ErrorCode)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlaySelfTestErrorMessage(ErrorCode);

#else
  BuzzPlaySelfTestErrorAudio(ErrorCode);
#endif
}

void PlayUserAlreadyExistsAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayUserAlreadyExistsAudio();

#else
  BuzzPlayInsufficientPrivilegesAudio();
#endif
}

void PlayVerifyAdminPasswordAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayVerifyAdminPasswordAudio();

#else
  BuzzPlayLocalRegisterAudio();
#endif
}

void PlayExitRegisterMethodAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayExitRegisterMethodAudio();

#else
  BuzzPlayRegisterErrorAudio();
#endif
}

void PlayCardAffiliationErrorAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayPermissionDeniedAudio();

#else
  BuzzPlayCardAffiliationErrorAudio();
#endif
}

void PlayThisFunctionCardHasBeenDisabled(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayPermissionDeniedAudio();

#else
  BuzzPlayThisFunctionCardHasBeenDisabledAudio();
#endif
}

void PlayVerifyUserPermissionsAudio(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayVerifyUserPermissionsAudio();

#else
  BuzzPlayLocalRegisterAudio();
#endif
}

void PlayRegisterUserCountAudio(uint8_t SuccessCount, uint8_t FailureCount)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayRegisterUserCountAudio(SuccessCount, FailureCount);

#else
#endif
}

void PlayRemainingBatteryPercentageAudio(uint8_t Percentage)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fPlayRemainingBatteryPercentageAudio(Percentage);

#else
#endif
}

void SoundConfiguration(void)
{
#if _VOICE_PLAY_TYPE_ == _VOICE_PLAY_SPEAKER_
  Wt588fConfiguration();
#else
  BuzzConfiguration();
#endif
}
